
// @ts-ignore
import axios from '@/utils/axios.ts';
// @ts-ignore
const getSearchTagList = params => axios('post', '/products/facets/ingredients/query', JSON.stringify({ maxFacetHits: 100, facetFilters: [], ...params }));

const getTagsList = () => axios('post', '/graphql', {
  operationName: "getTags",
  variables: {},
  query: "query getTags {\n  allTags: tags(limit: 100) {\n    data {\n      id\n      name\n      tagType {\n        id\n        name\n        __typename\n      }\n      __typename\n    }\n    __typename\n  }\n  commonTags: tags(only_common: true, limit: 20) {\n    data {\n      id\n      name\n      __typename\n    }\n    __typename\n  }\n  productTags: productTypes(limit: 100) {\n    data {\n      id\n      name\n      __typename\n    }\n    __typename\n  }\n}"
}, {
  headers: {
    'Content-Type': 'application/json',
    'X-Algolia-Api-Key': undefined,
    'X-Algolia-Application-Id': undefined
  },
})

export {
  getSearchTagList,
  getTagsList
}